package pdf;

import java.io.*;
import java.time.Instant;

/**
 * @author huu
 * @create 2025-08-23-15:05
 */
public class main {
    public static void main(String[] args) throws IOException {
        File file = new File("F:\\BaiduNetdiskDownload\\面试.pdf");

        //时间
        long l = Instant.now().toEpochMilli();
        try {

            //InputStream is = new FileInputStream(file);
            //InputStream is = new InputBuffer(new FileInputStream(file));
            InputStream is = new countReadInputBuffer(new FileInputStream(file));
            while(true){
                int i = is.read();
                if(i == -1){
                    is.close();
                    break;
                }
            }
            System.out.println(Instant.now().toEpochMilli() - l +"毫秒 ");

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
